/*
Copyright 2010,2011 Matt Van Der Westhuizen

This file is part of CGLL.

CGLL is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

CGLL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with CGLL.  If not, see <http://www.gnu.org/licenses/>.
*/

package org.chaoticengine.cgll.input;

import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;

/**
 *
 * @author Matt Van Der Westhuizen <mattpwest@gmail.com>
 */
@Root(name="binding")
public class Binding {
    /** Name of the command. */
    protected String commandName = "";

    /** Allows caching of the Command object after it is used the first time. */
    protected Command command = null;

    /** InputDevice device binding. */
    protected InputDevice input = null;

    public Binding() {}

    @Attribute(name="command")
    public String getCommandName() {
        return commandName;
    }

    @Attribute(name="command")
    public void setCommandName(String command) {
        this.commandName = command;
    }

    @Element(name="bind")
    public InputDevice getInput() {
        return input;
    }

    @Element(name="bind")
    public void setInput(InputDevice input) {
        this.input = input;
    }
}
